package net.lunjin.service.impl;

import java.util.List;

import net.lunjin.bean.BlackList;
import net.lunjin.dao.BlackListDao;
import net.lunjin.service.BlackListService;

import org.springframework.beans.factory.annotation.Autowired;

public class BlackListServiceImpl implements BlackListService {

	@Autowired
	private BlackListDao blackListDao;

	@Override
	public List<BlackList> getAll() throws Exception {
		return blackListDao.findAll();
	}
	
	@Override
	public boolean isBlackList(String ip) throws Exception {
		return blackListDao.isBlackList(ip);
	}

	@Override
	public boolean insert(BlackList blackList) throws Exception {
		return blackListDao.insert(blackList);
	}

	@Override
	public boolean delete(BlackList blackList) throws Exception {
		return blackListDao.delete(blackList);
	}

}
